﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using AutoR.Helpers;
using AutoR.Messages;
using AutoR.Models;
using AutoR.Tasks;
using LiteDB;
using Microsoft.AppCenter.Crashes;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Prism.Mvvm;
using Xamarin.Forms;

namespace AutoR.Services
{
	// Token: 0x02000113 RID: 275
	public class GameData : BindableBase
	{
		// Token: 0x1700019D RID: 413
		// (get) Token: 0x060005F0 RID: 1520 RVA: 0x00058DA3 File Offset: 0x00056FA3
		// (set) Token: 0x060005F1 RID: 1521 RVA: 0x00058DAC File Offset: 0x00056FAC
		private string _userId
		{
			[CompilerGenerated]
			get
			{
				return this.<_userId>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<_userId>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<_userId>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs._userId);
			}
		}

		// Token: 0x1700019E RID: 414
		// (get) Token: 0x060005F2 RID: 1522 RVA: 0x00058DDD File Offset: 0x00056FDD
		// (set) Token: 0x060005F3 RID: 1523 RVA: 0x00058DE8 File Offset: 0x00056FE8
		private DateTime _lastCheck
		{
			[CompilerGenerated]
			get
			{
				return this.<_lastCheck>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (DateTime.Equals(this.<_lastCheck>k__BackingField, value))
				{
					return;
				}
				this.<_lastCheck>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs._lastCheck);
			}
		}

		// Token: 0x1700019F RID: 415
		// (get) Token: 0x060005F4 RID: 1524 RVA: 0x00058E18 File Offset: 0x00057018
		// (set) Token: 0x060005F5 RID: 1525 RVA: 0x00058E20 File Offset: 0x00057020
		private int _heartErr
		{
			[CompilerGenerated]
			get
			{
				return this.<_heartErr>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<_heartErr>k__BackingField == value)
				{
					return;
				}
				this.<_heartErr>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs._heartErr);
			}
		}

		// Token: 0x170001A0 RID: 416
		// (get) Token: 0x060005F6 RID: 1526 RVA: 0x00058E4D File Offset: 0x0005704D
		// (set) Token: 0x060005F7 RID: 1527 RVA: 0x00058E58 File Offset: 0x00057058
		public int ServerType
		{
			[CompilerGenerated]
			get
			{
				return this.<ServerType>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<ServerType>k__BackingField == value)
				{
					return;
				}
				this.<ServerType>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ServerType);
			}
		}

		// Token: 0x170001A1 RID: 417
		// (get) Token: 0x060005F8 RID: 1528 RVA: 0x00058E85 File Offset: 0x00057085
		// (set) Token: 0x060005F9 RID: 1529 RVA: 0x00058E90 File Offset: 0x00057090
		public string Username
		{
			[CompilerGenerated]
			get
			{
				return this.<Username>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<Username>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<Username>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Username);
			}
		}

		// Token: 0x170001A2 RID: 418
		// (get) Token: 0x060005FA RID: 1530 RVA: 0x00058EC1 File Offset: 0x000570C1
		// (set) Token: 0x060005FB RID: 1531 RVA: 0x00058ECC File Offset: 0x000570CC
		public string Password
		{
			[CompilerGenerated]
			get
			{
				return this.<Password>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<Password>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<Password>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Password);
			}
		}

		// Token: 0x170001A3 RID: 419
		// (get) Token: 0x060005FC RID: 1532 RVA: 0x00058EFD File Offset: 0x000570FD
		// (set) Token: 0x060005FD RID: 1533 RVA: 0x00058F08 File Offset: 0x00057108
		public Color Status
		{
			[CompilerGenerated]
			get
			{
				return this.<Status>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Status>k__BackingField == value)
				{
					return;
				}
				this.<Status>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Status);
			}
		}

		// Token: 0x170001A4 RID: 420
		// (get) Token: 0x060005FE RID: 1534 RVA: 0x00058F38 File Offset: 0x00057138
		// (set) Token: 0x060005FF RID: 1535 RVA: 0x00058F40 File Offset: 0x00057140
		public float AttackSleepNum
		{
			[CompilerGenerated]
			get
			{
				return this.<AttackSleepNum>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<AttackSleepNum>k__BackingField == value)
				{
					return;
				}
				this.<AttackSleepNum>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AttackSleepNum);
			}
		}

		// Token: 0x170001A5 RID: 421
		// (get) Token: 0x06000600 RID: 1536 RVA: 0x00058F70 File Offset: 0x00057170
		// (set) Token: 0x06000601 RID: 1537 RVA: 0x00058F78 File Offset: 0x00057178
		public bool IsLogin
		{
			[CompilerGenerated]
			get
			{
				return this.<IsLogin>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<IsLogin>k__BackingField == value)
				{
					return;
				}
				this.<IsLogin>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsLogin);
			}
		}

		// Token: 0x170001A6 RID: 422
		// (get) Token: 0x06000602 RID: 1538 RVA: 0x00058FA5 File Offset: 0x000571A5
		// (set) Token: 0x06000603 RID: 1539 RVA: 0x00058FB0 File Offset: 0x000571B0
		public bool IsTry
		{
			[CompilerGenerated]
			get
			{
				return this.<IsTry>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<IsTry>k__BackingField == value)
				{
					return;
				}
				this.<IsTry>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsTry);
			}
		}

		// Token: 0x170001A7 RID: 423
		// (get) Token: 0x06000604 RID: 1540 RVA: 0x00058FDD File Offset: 0x000571DD
		// (set) Token: 0x06000605 RID: 1541 RVA: 0x00058FE8 File Offset: 0x000571E8
		public bool IsCheck
		{
			[CompilerGenerated]
			get
			{
				return this.<IsCheck>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<IsCheck>k__BackingField == value)
				{
					return;
				}
				this.<IsCheck>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsCheck);
			}
		}

		// Token: 0x170001A8 RID: 424
		// (get) Token: 0x06000606 RID: 1542 RVA: 0x00059015 File Offset: 0x00057215
		// (set) Token: 0x06000607 RID: 1543 RVA: 0x00059020 File Offset: 0x00057220
		public DateTime LoginTime
		{
			[CompilerGenerated]
			get
			{
				return this.<LoginTime>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (DateTime.Equals(this.<LoginTime>k__BackingField, value))
				{
					return;
				}
				this.<LoginTime>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.LoginTime);
			}
		}

		// Token: 0x170001A9 RID: 425
		// (get) Token: 0x06000608 RID: 1544 RVA: 0x00059050 File Offset: 0x00057250
		// (set) Token: 0x06000609 RID: 1545 RVA: 0x00059058 File Offset: 0x00057258
		public string MainLog
		{
			[CompilerGenerated]
			get
			{
				return this.<MainLog>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<MainLog>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<MainLog>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MainLog);
			}
		}

		// Token: 0x170001AA RID: 426
		// (get) Token: 0x0600060A RID: 1546 RVA: 0x00059089 File Offset: 0x00057289
		// (set) Token: 0x0600060B RID: 1547 RVA: 0x00059094 File Offset: 0x00057294
		public string PickLog
		{
			[CompilerGenerated]
			get
			{
				return this.<PickLog>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<PickLog>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<PickLog>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.PickLog);
			}
		}

		// Token: 0x170001AB RID: 427
		// (get) Token: 0x0600060C RID: 1548 RVA: 0x000590C5 File Offset: 0x000572C5
		// (set) Token: 0x0600060D RID: 1549 RVA: 0x000590D0 File Offset: 0x000572D0
		public bool FullLog
		{
			[CompilerGenerated]
			get
			{
				return this.<FullLog>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<FullLog>k__BackingField == value)
				{
					return;
				}
				this.<FullLog>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.FullLog);
			}
		}

		// Token: 0x170001AC RID: 428
		// (get) Token: 0x0600060E RID: 1550 RVA: 0x000590FD File Offset: 0x000572FD
		// (set) Token: 0x0600060F RID: 1551 RVA: 0x00059108 File Offset: 0x00057308
		public bool IsSvrStart
		{
			[CompilerGenerated]
			get
			{
				return this.<IsSvrStart>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<IsSvrStart>k__BackingField == value)
				{
					return;
				}
				this.<IsSvrStart>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsSvrStart);
			}
		}

		// Token: 0x170001AD RID: 429
		// (get) Token: 0x06000610 RID: 1552 RVA: 0x00059135 File Offset: 0x00057335
		// (set) Token: 0x06000611 RID: 1553 RVA: 0x00059140 File Offset: 0x00057340
		public string CDK
		{
			[CompilerGenerated]
			get
			{
				return this.<CDK>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<CDK>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<CDK>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CDK);
			}
		}

		// Token: 0x170001AE RID: 430
		// (get) Token: 0x06000612 RID: 1554 RVA: 0x00059171 File Offset: 0x00057371
		// (set) Token: 0x06000613 RID: 1555 RVA: 0x0005917C File Offset: 0x0005737C
		public string CDKToken
		{
			[CompilerGenerated]
			get
			{
				return this.<CDKToken>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<CDKToken>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<CDKToken>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CDKToken);
			}
		}

		// Token: 0x170001AF RID: 431
		// (get) Token: 0x06000614 RID: 1556 RVA: 0x000591AD File Offset: 0x000573AD
		// (set) Token: 0x06000615 RID: 1557 RVA: 0x000591B8 File Offset: 0x000573B8
		public DateTime CDKTime
		{
			[CompilerGenerated]
			get
			{
				return this.<CDKTime>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (DateTime.Equals(this.<CDKTime>k__BackingField, value))
				{
					return;
				}
				this.<CDKTime>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CDKTime);
			}
		}

		// Token: 0x170001B0 RID: 432
		// (get) Token: 0x06000616 RID: 1558 RVA: 0x000591E8 File Offset: 0x000573E8
		// (set) Token: 0x06000617 RID: 1559 RVA: 0x000591F0 File Offset: 0x000573F0
		public string VersionName
		{
			[CompilerGenerated]
			get
			{
				return this.<VersionName>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<VersionName>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<VersionName>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.VersionName);
			}
		}

		// Token: 0x170001B1 RID: 433
		// (get) Token: 0x06000618 RID: 1560 RVA: 0x00059221 File Offset: 0x00057421
		// (set) Token: 0x06000619 RID: 1561 RVA: 0x0005922C File Offset: 0x0005742C
		public bool MusicStart
		{
			[CompilerGenerated]
			get
			{
				return this.<MusicStart>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<MusicStart>k__BackingField == value)
				{
					return;
				}
				this.<MusicStart>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MusicStop);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.MusicStart);
			}
		}

		// Token: 0x170001B2 RID: 434
		// (get) Token: 0x0600061A RID: 1562 RVA: 0x00059264 File Offset: 0x00057464
		public bool MusicStop
		{
			get
			{
				return !this.MusicStart;
			}
		}

		// Token: 0x170001B3 RID: 435
		// (get) Token: 0x0600061B RID: 1563 RVA: 0x0005926F File Offset: 0x0005746F
		// (set) Token: 0x0600061C RID: 1564 RVA: 0x00059278 File Offset: 0x00057478
		public bool Vol
		{
			[CompilerGenerated]
			get
			{
				return this.<Vol>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Vol>k__BackingField == value)
				{
					return;
				}
				this.<Vol>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.VolMute);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Vol);
			}
		}

		// Token: 0x170001B4 RID: 436
		// (get) Token: 0x0600061D RID: 1565 RVA: 0x000592B0 File Offset: 0x000574B0
		public bool VolMute
		{
			get
			{
				return !this.Vol;
			}
		}

		// Token: 0x170001B5 RID: 437
		// (get) Token: 0x0600061E RID: 1566 RVA: 0x000592BB File Offset: 0x000574BB
		// (set) Token: 0x0600061F RID: 1567 RVA: 0x000592C4 File Offset: 0x000574C4
		public Statistics Statistics
		{
			[CompilerGenerated]
			get
			{
				return this.<Statistics>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Statistics>k__BackingField, value))
				{
					return;
				}
				this.<Statistics>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Statistics);
			}
		}

		// Token: 0x170001B6 RID: 438
		// (get) Token: 0x06000620 RID: 1568 RVA: 0x000592F4 File Offset: 0x000574F4
		// (set) Token: 0x06000621 RID: 1569 RVA: 0x000592FC File Offset: 0x000574FC
		public UserInfo User
		{
			[CompilerGenerated]
			get
			{
				return this.<User>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<User>k__BackingField, value))
				{
					return;
				}
				this.<User>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.User);
			}
		}

		// Token: 0x170001B7 RID: 439
		// (get) Token: 0x06000622 RID: 1570 RVA: 0x0005932C File Offset: 0x0005752C
		// (set) Token: 0x06000623 RID: 1571 RVA: 0x00059334 File Offset: 0x00057534
		public ObservableCollection<UserFleet> Fleet
		{
			[CompilerGenerated]
			get
			{
				return this.<Fleet>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Fleet>k__BackingField, value))
				{
					return;
				}
				this.<Fleet>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ExplorerFleet);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AttackFleet);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Fleet);
			}
		}

		// Token: 0x170001B8 RID: 440
		// (get) Token: 0x06000624 RID: 1572 RVA: 0x0005937A File Offset: 0x0005757A
		// (set) Token: 0x06000625 RID: 1573 RVA: 0x00059384 File Offset: 0x00057584
		public ObservableCollection<UserShip> UserShip
		{
			[CompilerGenerated]
			get
			{
				return this.<UserShip>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<UserShip>k__BackingField, value))
				{
					return;
				}
				this.<UserShip>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.SecretaryShip);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.UserShip);
			}
		}

		// Token: 0x170001B9 RID: 441
		// (get) Token: 0x06000626 RID: 1574 RVA: 0x000593BF File Offset: 0x000575BF
		// (set) Token: 0x06000627 RID: 1575 RVA: 0x000593C8 File Offset: 0x000575C8
		public ObservableCollection<UserEquipment> Equipments
		{
			[CompilerGenerated]
			get
			{
				return this.<Equipments>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Equipments>k__BackingField, value))
				{
					return;
				}
				this.<Equipments>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.EquipmentNum);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Equipments);
			}
		}

		// Token: 0x170001BA RID: 442
		// (get) Token: 0x06000628 RID: 1576 RVA: 0x00059403 File Offset: 0x00057603
		// (set) Token: 0x06000629 RID: 1577 RVA: 0x0005940C File Offset: 0x0005760C
		public ObservableCollection<UserExplore> PVEExplore
		{
			[CompilerGenerated]
			get
			{
				return this.<PVEExplore>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<PVEExplore>k__BackingField, value))
				{
					return;
				}
				this.<PVEExplore>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Explore1);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Explore2);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Explore3);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Explore4);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.PVEExplore);
			}
		}

		// Token: 0x170001BB RID: 443
		// (get) Token: 0x0600062A RID: 1578 RVA: 0x00059468 File Offset: 0x00057668
		// (set) Token: 0x0600062B RID: 1579 RVA: 0x00059470 File Offset: 0x00057670
		public ObservableCollection<int> UnlockShip
		{
			[CompilerGenerated]
			get
			{
				return this.<UnlockShip>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<UnlockShip>k__BackingField, value))
				{
					return;
				}
				this.<UnlockShip>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.UnlockShip);
			}
		}

		// Token: 0x170001BC RID: 444
		// (get) Token: 0x0600062C RID: 1580 RVA: 0x000594A0 File Offset: 0x000576A0
		// (set) Token: 0x0600062D RID: 1581 RVA: 0x000594A8 File Offset: 0x000576A8
		public ObservableCollection<UserItem> Package
		{
			[CompilerGenerated]
			get
			{
				return this.<Package>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Package>k__BackingField, value))
				{
					return;
				}
				this.<Package>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Item541);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Item241);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Item741);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Item141);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Itemhm);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Itemzl);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Itemxy);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Itemqz);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Itemqt);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Package);
			}
		}

		// Token: 0x170001BD RID: 445
		// (get) Token: 0x0600062E RID: 1582 RVA: 0x0005953B File Offset: 0x0005773B
		// (set) Token: 0x0600062F RID: 1583 RVA: 0x00059544 File Offset: 0x00057744
		public ObservableCollection<DockInfo> Dock
		{
			[CompilerGenerated]
			get
			{
				return this.<Dock>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Dock>k__BackingField, value))
				{
					return;
				}
				this.<Dock>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Dock);
			}
		}

		// Token: 0x170001BE RID: 446
		// (get) Token: 0x06000630 RID: 1584 RVA: 0x00059574 File Offset: 0x00057774
		// (set) Token: 0x06000631 RID: 1585 RVA: 0x0005957C File Offset: 0x0005777C
		public ObservableCollection<EquipmentDockInfo> EquipmentDock
		{
			[CompilerGenerated]
			get
			{
				return this.<EquipmentDock>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<EquipmentDock>k__BackingField, value))
				{
					return;
				}
				this.<EquipmentDock>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.EquipmentDock);
			}
		}

		// Token: 0x170001BF RID: 447
		// (get) Token: 0x06000632 RID: 1586 RVA: 0x000595AC File Offset: 0x000577AC
		// (set) Token: 0x06000633 RID: 1587 RVA: 0x000595B4 File Offset: 0x000577B4
		public ObservableCollection<RepairDockInfo> RepairDock
		{
			[CompilerGenerated]
			get
			{
				return this.<RepairDock>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<RepairDock>k__BackingField, value))
				{
					return;
				}
				this.<RepairDock>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.RepairDock);
			}
		}

		// Token: 0x170001C0 RID: 448
		// (get) Token: 0x06000634 RID: 1588 RVA: 0x000595E4 File Offset: 0x000577E4
		// (set) Token: 0x06000635 RID: 1589 RVA: 0x000595EC File Offset: 0x000577EC
		public ObservableCollection<UserQuest> UserTask
		{
			[CompilerGenerated]
			get
			{
				return this.<UserTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<UserTask>k__BackingField, value))
				{
					return;
				}
				this.<UserTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.UserTask);
			}
		}

		// Token: 0x170001C1 RID: 449
		// (get) Token: 0x06000636 RID: 1590 RVA: 0x0005961C File Offset: 0x0005781C
		// (set) Token: 0x06000637 RID: 1591 RVA: 0x00059624 File Offset: 0x00057824
		public ObservableCollection<Tactic> Tactics
		{
			[CompilerGenerated]
			get
			{
				return this.<Tactics>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Tactics>k__BackingField, value))
				{
					return;
				}
				this.<Tactics>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.SchoolTactic);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Tactics);
			}
		}

		// Token: 0x170001C2 RID: 450
		// (get) Token: 0x06000638 RID: 1592 RVA: 0x0005965F File Offset: 0x0005785F
		// (set) Token: 0x06000639 RID: 1593 RVA: 0x00059668 File Offset: 0x00057868
		public int Secretary
		{
			[CompilerGenerated]
			get
			{
				return this.<Secretary>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Secretary>k__BackingField == value)
				{
					return;
				}
				this.<Secretary>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.SecretaryShip);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Secretary);
			}
		}

		// Token: 0x170001C3 RID: 451
		// (get) Token: 0x0600063A RID: 1594 RVA: 0x000596A0 File Offset: 0x000578A0
		public UserShip SecretaryShip
		{
			get
			{
				return this.UserShip.SingleOrDefault((UserShip i) => i.id == this.Secretary);
			}
		}

		// Token: 0x170001C4 RID: 452
		// (get) Token: 0x0600063B RID: 1595 RVA: 0x000596B9 File Offset: 0x000578B9
		// (set) Token: 0x0600063C RID: 1596 RVA: 0x000596C4 File Offset: 0x000578C4
		public GlobalConfig GlobalConfig
		{
			[CompilerGenerated]
			get
			{
				return this.<GlobalConfig>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<GlobalConfig>k__BackingField, value))
				{
					return;
				}
				this.<GlobalConfig>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.GlobalConfig);
			}
		}

		// Token: 0x170001C5 RID: 453
		// (get) Token: 0x0600063D RID: 1597 RVA: 0x000596F4 File Offset: 0x000578F4
		// (set) Token: 0x0600063E RID: 1598 RVA: 0x000596FC File Offset: 0x000578FC
		public ExploreTask ExploreTask
		{
			[CompilerGenerated]
			get
			{
				return this.<ExploreTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<ExploreTask>k__BackingField, value))
				{
					return;
				}
				this.<ExploreTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ExploreTask);
			}
		}

		// Token: 0x170001C6 RID: 454
		// (get) Token: 0x0600063F RID: 1599 RVA: 0x0005972C File Offset: 0x0005792C
		// (set) Token: 0x06000640 RID: 1600 RVA: 0x00059734 File Offset: 0x00057934
		public DrillTask DrillTask
		{
			[CompilerGenerated]
			get
			{
				return this.<DrillTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<DrillTask>k__BackingField, value))
				{
					return;
				}
				this.<DrillTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.DrillTask);
			}
		}

		// Token: 0x170001C7 RID: 455
		// (get) Token: 0x06000641 RID: 1601 RVA: 0x00059764 File Offset: 0x00057964
		// (set) Token: 0x06000642 RID: 1602 RVA: 0x0005976C File Offset: 0x0005796C
		public CampaignTask CampaignTask
		{
			[CompilerGenerated]
			get
			{
				return this.<CampaignTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<CampaignTask>k__BackingField, value))
				{
					return;
				}
				this.<CampaignTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.CampaignTask);
			}
		}

		// Token: 0x170001C8 RID: 456
		// (get) Token: 0x06000643 RID: 1603 RVA: 0x0005979C File Offset: 0x0005799C
		// (set) Token: 0x06000644 RID: 1604 RVA: 0x000597A4 File Offset: 0x000579A4
		public StrengthenTask StrengthenTask
		{
			[CompilerGenerated]
			get
			{
				return this.<StrengthenTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<StrengthenTask>k__BackingField, value))
				{
					return;
				}
				this.<StrengthenTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.StrengthenTask);
			}
		}

		// Token: 0x170001C9 RID: 457
		// (get) Token: 0x06000645 RID: 1605 RVA: 0x000597D4 File Offset: 0x000579D4
		// (set) Token: 0x06000646 RID: 1606 RVA: 0x000597DC File Offset: 0x000579DC
		public RepairTask RepairTask
		{
			[CompilerGenerated]
			get
			{
				return this.<RepairTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<RepairTask>k__BackingField, value))
				{
					return;
				}
				this.<RepairTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.RepairTask);
			}
		}

		// Token: 0x170001CA RID: 458
		// (get) Token: 0x06000647 RID: 1607 RVA: 0x0005980C File Offset: 0x00057A0C
		// (set) Token: 0x06000648 RID: 1608 RVA: 0x00059814 File Offset: 0x00057A14
		public AwardTask AwardTask
		{
			[CompilerGenerated]
			get
			{
				return this.<AwardTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<AwardTask>k__BackingField, value))
				{
					return;
				}
				this.<AwardTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AwardTask);
			}
		}

		// Token: 0x170001CB RID: 459
		// (get) Token: 0x06000649 RID: 1609 RVA: 0x00059844 File Offset: 0x00057A44
		// (set) Token: 0x0600064A RID: 1610 RVA: 0x0005984C File Offset: 0x00057A4C
		public FriendTask FriendTask
		{
			[CompilerGenerated]
			get
			{
				return this.<FriendTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<FriendTask>k__BackingField, value))
				{
					return;
				}
				this.<FriendTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.FriendTask);
			}
		}

		// Token: 0x170001CC RID: 460
		// (get) Token: 0x0600064B RID: 1611 RVA: 0x0005987C File Offset: 0x00057A7C
		// (set) Token: 0x0600064C RID: 1612 RVA: 0x00059884 File Offset: 0x00057A84
		public OthersConfig OthersConfig
		{
			[CompilerGenerated]
			get
			{
				return this.<OthersConfig>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<OthersConfig>k__BackingField, value))
				{
					return;
				}
				this.<OthersConfig>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.OthersConfig);
			}
		}

		// Token: 0x170001CD RID: 461
		// (get) Token: 0x0600064D RID: 1613 RVA: 0x000598B4 File Offset: 0x00057AB4
		// (set) Token: 0x0600064E RID: 1614 RVA: 0x000598BC File Offset: 0x00057ABC
		public ObservableCollection<AttackTask> AttackTasks
		{
			[CompilerGenerated]
			get
			{
				return this.<AttackTasks>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<AttackTasks>k__BackingField, value))
				{
					return;
				}
				this.<AttackTasks>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.AttackTasks);
			}
		}

		// Token: 0x170001CE RID: 462
		// (get) Token: 0x0600064F RID: 1615 RVA: 0x000598EC File Offset: 0x00057AEC
		// (set) Token: 0x06000650 RID: 1616 RVA: 0x000598F4 File Offset: 0x00057AF4
		public DelayTask DelayTask
		{
			[CompilerGenerated]
			get
			{
				return this.<DelayTask>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<DelayTask>k__BackingField, value))
				{
					return;
				}
				this.<DelayTask>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.DelayTask);
			}
		}

		// Token: 0x170001CF RID: 463
		// (get) Token: 0x06000651 RID: 1617 RVA: 0x00059924 File Offset: 0x00057B24
		public int EquipmentNum
		{
			get
			{
				return this.Equipments.Sum((UserEquipment i) => i.num);
			}
		}

		// Token: 0x170001D0 RID: 464
		// (get) Token: 0x06000652 RID: 1618 RVA: 0x00059950 File Offset: 0x00057B50
		public List<UserFleet> ExplorerFleet
		{
			get
			{
				ObservableCollection<UserFleet> fleet = this.Fleet;
				if (fleet == null)
				{
					return null;
				}
				return fleet.Skip(4).ToList<UserFleet>();
			}
		}

		// Token: 0x170001D1 RID: 465
		// (get) Token: 0x06000653 RID: 1619 RVA: 0x00059969 File Offset: 0x00057B69
		public List<UserFleet> AttackFleet
		{
			get
			{
				ObservableCollection<UserFleet> fleet = this.Fleet;
				if (fleet == null)
				{
					return null;
				}
				return fleet.Take(4).ToList<UserFleet>();
			}
		}

		// Token: 0x170001D2 RID: 466
		// (get) Token: 0x06000654 RID: 1620 RVA: 0x00059982 File Offset: 0x00057B82
		public List<Tactic> SchoolTactic
		{
			get
			{
				ObservableCollection<Tactic> tactics = this.Tactics;
				if (tactics == null)
				{
					return null;
				}
				return (from i in tactics
				where i.status
				select i).ToList<Tactic>();
			}
		}

		// Token: 0x170001D3 RID: 467
		// (get) Token: 0x06000655 RID: 1621 RVA: 0x000599B9 File Offset: 0x00057BB9
		public UserExplore Explore1
		{
			get
			{
				return this.PVEExplore.SingleOrDefault((UserExplore i) => i.fleetId == 5);
			}
		}

		// Token: 0x170001D4 RID: 468
		// (get) Token: 0x06000656 RID: 1622 RVA: 0x000599E5 File Offset: 0x00057BE5
		public UserExplore Explore2
		{
			get
			{
				return this.PVEExplore.SingleOrDefault((UserExplore i) => i.fleetId == 6);
			}
		}

		// Token: 0x170001D5 RID: 469
		// (get) Token: 0x06000657 RID: 1623 RVA: 0x00059A11 File Offset: 0x00057C11
		public UserExplore Explore3
		{
			get
			{
				return this.PVEExplore.SingleOrDefault((UserExplore i) => i.fleetId == 7);
			}
		}

		// Token: 0x170001D6 RID: 470
		// (get) Token: 0x06000658 RID: 1624 RVA: 0x00059A3D File Offset: 0x00057C3D
		public UserExplore Explore4
		{
			get
			{
				return this.PVEExplore.SingleOrDefault((UserExplore i) => i.fleetId == 8);
			}
		}

		// Token: 0x170001D7 RID: 471
		// (get) Token: 0x06000659 RID: 1625 RVA: 0x00059A69 File Offset: 0x00057C69
		public UserItem Item541
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 541);
			}
		}

		// Token: 0x170001D8 RID: 472
		// (get) Token: 0x0600065A RID: 1626 RVA: 0x00059A95 File Offset: 0x00057C95
		public UserItem Item241
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 241);
			}
		}

		// Token: 0x170001D9 RID: 473
		// (get) Token: 0x0600065B RID: 1627 RVA: 0x00059AC1 File Offset: 0x00057CC1
		public UserItem Item741
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 741);
			}
		}

		// Token: 0x170001DA RID: 474
		// (get) Token: 0x0600065C RID: 1628 RVA: 0x00059AED File Offset: 0x00057CED
		public UserItem Item141
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 141);
			}
		}

		// Token: 0x170001DB RID: 475
		// (get) Token: 0x0600065D RID: 1629 RVA: 0x00059B19 File Offset: 0x00057D19
		public UserItem Itemhm
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 10141);
			}
		}

		// Token: 0x170001DC RID: 476
		// (get) Token: 0x0600065E RID: 1630 RVA: 0x00059B45 File Offset: 0x00057D45
		public UserItem Itemzl
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 10241);
			}
		}

		// Token: 0x170001DD RID: 477
		// (get) Token: 0x0600065F RID: 1631 RVA: 0x00059B71 File Offset: 0x00057D71
		public UserItem Itemxy
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 10341);
			}
		}

		// Token: 0x170001DE RID: 478
		// (get) Token: 0x06000660 RID: 1632 RVA: 0x00059B9D File Offset: 0x00057D9D
		public UserItem Itemqz
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 10441);
			}
		}

		// Token: 0x170001DF RID: 479
		// (get) Token: 0x06000661 RID: 1633 RVA: 0x00059BC9 File Offset: 0x00057DC9
		public UserItem Itemqt
		{
			get
			{
				return this.Package.SingleOrDefault((UserItem i) => i.itemCid == 10541);
			}
		}

		// Token: 0x06000662 RID: 1634 RVA: 0x00059BF8 File Offset: 0x00057DF8
		public GameData()
		{
			this.<_lastCheck>k__BackingField = DateTime.Now;
			this._ranNum = new Random().Next(10, 50);
			this._sleepmin = new Random().Next(0, 2);
			this._sleepmax = new Random().Next(6, 9);
			this.<LoginTime>k__BackingField = DateTime.Now;
			this.<Vol>k__BackingField = true;
			this.<Statistics>k__BackingField = new Statistics();
			this.<Fleet>k__BackingField = new ObservableCollection<UserFleet>();
			this.<UserShip>k__BackingField = new ObservableCollection<UserShip>();
			this.<Equipments>k__BackingField = new ObservableCollection<UserEquipment>();
			this.<PVEExplore>k__BackingField = new ObservableCollection<UserExplore>();
			this.<UnlockShip>k__BackingField = new ObservableCollection<int>();
			this.<Package>k__BackingField = new ObservableCollection<UserItem>();
			this.<Dock>k__BackingField = new ObservableCollection<DockInfo>();
			this.<EquipmentDock>k__BackingField = new ObservableCollection<EquipmentDockInfo>();
			this.<RepairDock>k__BackingField = new ObservableCollection<RepairDockInfo>();
			this.<UserTask>k__BackingField = new ObservableCollection<UserQuest>();
			this.<Tactics>k__BackingField = new ObservableCollection<Tactic>();
			this.<GlobalConfig>k__BackingField = new GlobalConfig
			{
				TaskMinDelay = 1,
				TaskMaxDelay = 10,
				MinSeconds = 5,
				MaxSeconds = 30
			};
			this.<ExploreTask>k__BackingField = new ExploreTask
			{
				Enabled = true
			};
			this.<DrillTask>k__BackingField = new DrillTask();
			this.<CampaignTask>k__BackingField = new CampaignTask();
			this.<StrengthenTask>k__BackingField = new StrengthenTask();
			this.<RepairTask>k__BackingField = new RepairTask
			{
				Enabled = true
			};
			this.<AwardTask>k__BackingField = new AwardTask
			{
				Enabled = true
			};
			this.<FriendTask>k__BackingField = new FriendTask
			{
				Enabled = true
			};
			this.<OthersConfig>k__BackingField = new OthersConfig();
			this.<AttackTasks>k__BackingField = new ObservableCollection<AttackTask>();
			this.<DelayTask>k__BackingField = new DelayTask();
			base..ctor();
			MessagingCenter.Subscribe<LogMessage>(this, "Log", delegate(LogMessage message)
			{
				this.MainLog += string.Format("{0:T} {1}\n", DateTime.Now, message.Content);
				base.RaisePropertyChanged("Log");
			}, null);
			MessagingCenter.Subscribe<LogMessage>(this, "PickLog", delegate(LogMessage message)
			{
				this.PickLog += string.Format("{0:T} {1}\n", DateTime.Now, message.Content);
				base.RaisePropertyChanged("Log");
			}, null);
			MessagingCenter.Subscribe<LogMessage>(this, "FullLog", delegate(LogMessage message)
			{
				if (this.FullLog)
				{
					this.MainLog += string.Format("{0:T} {1}\n", DateTime.Now, message.Content);
					base.RaisePropertyChanged("Log");
				}
			}, null);
		}

		// Token: 0x06000663 RID: 1635 RVA: 0x00059DE0 File Offset: 0x00057FE0
		public void OnError(string message)
		{
			Runtime.Remote = new Remote();
			this.Fleet = new ObservableCollection<UserFleet>();
			this.RepairTask.RepairQueue = new Queue<UserShip>();
			this.MainLog += string.Format("{0:T} {1}\n", DateTime.Now, message);
		}

		// Token: 0x06000664 RID: 1636 RVA: 0x00059E38 File Offset: 0x00058038
		public async Task LoadConfigs(Server server)
		{
			this.VersionName = DependencyService.Get<ISystem>(DependencyFetchTarget.GlobalInstance).GetVersionName();
			Runtime.Server = server;
			string text = await Runtime.Remote.CheckVer();
			JToken json = JToken.Parse(text);
			if (json.First.Path == "eid")
			{
				throw new SysException("错误:" + text);
			}
			Runtime.HMLoginServer = json["hmLoginServer"].ToString();
			Runtime.LoginServer = json["loginServer"].ToString();
			LiteCollection<InitConfig> col = Runtime.ConfigDatabase.GetCollection<InitConfig>();
			InitConfig dv = col.FindOne(Query.All(1)) ?? new InitConfig();
			if (dv.Version != json["DataVersion"].ToString())
			{
				JToken jtoken = await Runtime.Remote.GetInitConfigs();
				dv.Version = json["DataVersion"].ToString();
				dv.InitData = jtoken.ToString();
				col.Upsert(dv);
			}
			AllConfigs allConfigs = JsonConvert.DeserializeObject<AllConfigs>(dv.InitData);
			Runtime.Configs.shipCard = (from i in allConfigs.shipCard
			where !i.npc
			select i).ToList<ShipConfig>();
			this.AntiHarmony();
			Runtime.Configs.shipEquipment = allConfigs.shipEquipment;
			Runtime.Configs.pveExplore = allConfigs.pveExplore;
			Runtime.Configs.errorCode = allConfigs.errorCode;
			Runtime.Configs.ShipCookbook = allConfigs.ShipCookbook;
			Runtime.Configs.ShipTactics = (from i in allConfigs.ShipTactics
			where i.level == "3"
			select i).ToList<ShipTactics>();
			Runtime.Configs.shipEquipment.Add(new EquipmentConfig
			{
				cid = -1,
				picId = "0",
				title = "空"
			});
		}

		// Token: 0x06000665 RID: 1637 RVA: 0x00059E85 File Offset: 0x00058085
		public void StartService()
		{
			if (!this.IsCheck)
			{
				this.IsSvrStart = true;
				MessagingCenter.Send<LogMessage>(new LogMessage("[系统]开始后台服务"), "Log");
			}
		}

		// Token: 0x06000666 RID: 1638 RVA: 0x00059EAA File Offset: 0x000580AA
		public void StopService()
		{
			this.IsSvrStart = false;
			MessagingCenter.Send<LogMessage>(new LogMessage("[系统]停止后台服务"), "Log");
		}

		// Token: 0x06000667 RID: 1639 RVA: 0x00059EC8 File Offset: 0x000580C8
		public void AntiHarmony()
		{
			Dictionary<string, string> dictionary = new Dictionary<string, string>
			{
				{
					"魟",
					"扶桑"
				},
				{
					"鲼",
					"山城"
				},
				{
					"鳌",
					"伊势"
				},
				{
					"螯",
					"日向"
				},
				{
					"姈",
					"金刚"
				},
				{
					"妸",
					"比睿"
				},
				{
					"妱",
					"榛名"
				},
				{
					"姏",
					"雾岛"
				},
				{
					"凰",
					"赤城"
				},
				{
					"鸾",
					"加贺"
				},
				{
					"凤",
					"祥凤"
				},
				{
					"鹞",
					"瑞凤"
				},
				{
					"獒",
					"高雄"
				},
				{
					"犬",
					"爱宕"
				},
				{
					"犮",
					"摩耶"
				},
				{
					"猋",
					"鸟海"
				},
				{
					"豺",
					"天龙"
				},
				{
					"豹",
					"龙田"
				},
				{
					"狸",
					"北上"
				},
				{
					"獾",
					"大井"
				},
				{
					"貉",
					"五十铃"
				},
				{
					"狐",
					"夕张"
				},
				{
					"桐",
					"吹雪"
				},
				{
					"杉",
					"白雪"
				},
				{
					"杨",
					"初雪"
				},
				{
					"梧",
					"深雪"
				},
				{
					"枫",
					"晓"
				},
				{
					"栀",
					"响"
				},
				{
					"梓",
					"雷"
				},
				{
					"柏",
					"电"
				},
				{
					"柚",
					"绫波"
				},
				{
					"柿",
					"敷波"
				},
				{
					"鲨",
					"长门"
				},
				{
					"鲞",
					"陆奥"
				},
				{
					"鹩",
					"大凤"
				},
				{
					"枭",
					"龙骧"
				},
				{
					"狼",
					"古鹰"
				},
				{
					"狌",
					"加古"
				},
				{
					"犹",
					"青叶"
				},
				{
					"猅",
					"衣笠"
				},
				{
					"凊",
					"川内"
				},
				{
					"凉",
					"神通"
				},
				{
					"凁",
					"那珂"
				},
				{
					"椛",
					"秋月"
				},
				{
					"栎",
					"凉月"
				},
				{
					"萩",
					"阳炎"
				},
				{
					"蒲",
					"不知火"
				},
				{
					"蓉",
					"黑潮"
				},
				{
					"莲",
					"雪风"
				},
				{
					"鹬",
					"瑞鹤"
				},
				{
					"鹤",
					"翔鹤"
				},
				{
					"鸴",
					"飞龙"
				},
				{
					"鸷",
					"苍龙"
				},
				{
					"鲸",
					"信浓"
				},
				{
					"鸱",
					"飞鹰"
				},
				{
					"鸢",
					"隼鹰"
				},
				{
					"鹏",
					"凤翔"
				},
				{
					"猨",
					"最上"
				},
				{
					"狻",
					"三隈"
				},
				{
					"狺",
					"铃谷"
				},
				{
					"猁",
					"熊野"
				},
				{
					"狔",
					"香取"
				},
				{
					"淀",
					"大淀"
				},
				{
					"松",
					"睦月"
				},
				{
					"汀",
					"白露"
				},
				{
					"汐",
					"村雨"
				},
				{
					"氿",
					"夕立"
				},
				{
					"萍",
					"岚"
				},
				{
					"芒",
					"岛风"
				},
				{
					"棌",
					"峰风"
				},
				{
					"杙",
					"宵月"
				},
				{
					"鬣",
					"妙高"
				},
				{
					"鹰",
					"神鹰"
				},
				{
					"竺",
					"竹"
				},
				{
					"浜",
					"时雨"
				}
			};
			foreach (ShipConfig shipConfig in Runtime.Configs.shipCard)
			{
				if (dictionary.ContainsKey(shipConfig.title))
				{
					shipConfig.title = dictionary[shipConfig.title];
				}
			}
		}

		// Token: 0x06000668 RID: 1640 RVA: 0x0005A3F0 File Offset: 0x000585F0
		public async Task DoWork()
		{
			int num = 0;
			try
			{
				await this.Heart();
				if (this.IsLogin)
				{
					if (this._isError)
					{
						this.StopService();
						await Task.Delay(10000);
						await this.ReLogin();
						this.StartService();
						this._isError = false;
					}
					if (this.IsSvrStart)
					{
						foreach (AttackTask attackTask in this.AttackTasks)
						{
							if (attackTask.TaskReset && attackTask.CheckTime < DateTime.Now && !attackTask.Enabled)
							{
								attackTask.Enabled = true;
								MessagingCenter.Send<LogMessage>(new LogMessage("[系统]定时开启" + attackTask.Name + "任务"), "Log");
								attackTask.CheckTime = AutoR.Helpers.Extensions.GetCheckTime(attackTask.RestartTime, true);
							}
						}
						if (this.OthersConfig.BuildReset && this.OthersConfig.CheckTime < DateTime.Now)
						{
							if (this.OthersConfig.ShipResetNumber > 0)
							{
								this.OthersConfig.ShipBuild = true;
								this.OthersConfig.ShipBuildNumber = this.OthersConfig.ShipResetNumber;
							}
							if (this.OthersConfig.EquipmentResetNumber > 0)
							{
								this.OthersConfig.EquipmentBuild = true;
								this.OthersConfig.EquipmentBuildNumber = this.OthersConfig.EquipmentResetNumber;
							}
							MessagingCenter.Send<LogMessage>(new LogMessage("[系统]定时重置建造"), "Log");
							this.OthersConfig.CheckTime = AutoR.Helpers.Extensions.GetCheckTime(this.OthersConfig.ResetTime, true);
						}
						if (this.GlobalConfig.AutoSleep)
						{
							if (DateTime.Now.Hour > this._sleepmin && DateTime.Now.Hour < this._sleepmax)
							{
								MessagingCenter.Send<LogMessage>(new LogMessage("[系统]夜间休眠"), "FullLog");
								await Task.Delay(300000);
							}
							else
							{
								await this.Loop();
							}
						}
						else
						{
							await this.Loop();
						}
					}
				}
				await Task.Delay(new Random().Next(this.GlobalConfig.TaskMinDelay * 1000, this.GlobalConfig.TaskMaxDelay * 1000));
			}
			catch (OtherException ex)
			{
				throw ex;
			}
			catch (MaintainException obj)
			{
				num = 1;
			}
			catch (Exception ex2)
			{
				if (typeof(WebException) != ex2.GetType() && typeof(SysException) != ex2.GetType())
				{
					Crashes.TrackError(ex2, null);
				}
				this.Status = Color.Firebrick;
				this.OnError((typeof(WebException) == ex2.GetType()) ? "[系统]网络中断，正在努力重试" : ex2.Message);
				this._isError = true;
			}
			object obj;
			if (num == 1)
			{
				MaintainException ex3 = (MaintainException)obj;
				this.Status = Color.Firebrick;
				this.OnError(ex3.Message);
				MessagingCenter.Send<LogMessage>(new LogMessage("[系统]等待10分钟后尝试"), "Log");
				await Task.Delay(600000);
				this._isError = true;
			}
			obj = null;
		}

		// Token: 0x06000669 RID: 1641 RVA: 0x0005A438 File Offset: 0x00058638
		public async Task Heart()
		{
			if (this.IsLogin)
			{
				if (this.IsTry)
				{
					if (Math.Abs((DateTime.Now - this.LoginTime).TotalMinutes) > 30.0)
					{
						this.IsCheck = true;
						throw new SysException("[系统]本次试用已到期。");
					}
				}
				else
				{
					if ((DateTime.Now - this._lastCheck).TotalMinutes > 8.0)
					{
						if (this.CDK.Length != 32)
						{
							throw new SysException("[系统]验证码错误，请重启程序");
						}
						string text = await Runtime.Remote.GetRegcodeTime(this.CDK, this.CDKToken);
						int num;
						if (int.TryParse(text, out num))
						{
							this._heartErr = 0;
							this._lastCheck = DateTime.Now;
						}
						else
						{
							if (text.StartsWith("操作失败:"))
							{
								this.IsCheck = true;
								throw new SysException(text);
							}
							if (this._heartErr > 3)
							{
								this.IsCheck = true;
								throw new SysException("[系统]心跳数据错误，请重启程序");
							}
							this._heartErr++;
							this._lastCheck = this._lastCheck.AddMinutes(2.0);
						}
					}
					if (DateTime.Now > this.CDKTime)
					{
						this.IsCheck = true;
						throw new SysException("[系统]序列号失效或已到期。");
					}
				}
			}
		}

		// Token: 0x0600066A RID: 1642 RVA: 0x0005A480 File Offset: 0x00058680
		public async Task Loop()
		{
			if (this.IsSvrStart)
			{
				this.Status = Color.Chartreuse;
				if (this.GlobalConfig.CheckTime < DateTime.Now)
				{
					this.StopService();
					await Task.Delay(10000);
					await this.ReLogin();
					this.StartService();
					MessagingCenter.Send<LogMessage>(new LogMessage("[系统]定时重启"), "Log");
					this.GlobalConfig.CheckTime = AutoR.Helpers.Extensions.GetCheckTime(this.GlobalConfig.ResetTime, true);
				}
				await this.DelayTask.Start();
				if (this.RepairTask.Enabled)
				{
					await this.RepairTask.Start();
				}
				foreach (RepairDockInfo repairDockInfo in this.RepairDock)
				{
					repairDockInfo.Span = ((repairDockInfo.endTime > DateTime.Now) ? (repairDockInfo.endTime - DateTime.Now) : TimeSpan.Zero);
				}
				foreach (EquipmentDockInfo equipmentDockInfo in this.EquipmentDock)
				{
					equipmentDockInfo.Span = ((equipmentDockInfo.endTime > DateTime.Now) ? (equipmentDockInfo.endTime - DateTime.Now) : TimeSpan.Zero);
				}
				if (this.StrengthenTask.Enabled)
				{
					await this.StrengthenTask.Start();
				}
				if (this.ExploreTask.Enabled)
				{
					await this.ExploreTask.Start();
				}
				if (this.DrillTask.Enabled && this.DrillTask.StarTime < DateTime.Now)
				{
					await this.DrillTask.Start();
				}
				if (this.FriendTask.Enabled && this.FriendTask.StarTime < DateTime.Now)
				{
					await this.FriendTask.Start();
				}
				TaskAwaiter<bool> taskAwaiter2;
				if (this.CampaignTask.Enabled)
				{
					TaskAwaiter<bool> taskAwaiter = this.CampaignTask.Prepare().GetAwaiter();
					if (!taskAwaiter.IsCompleted)
					{
						await taskAwaiter;
						taskAwaiter = taskAwaiter2;
						taskAwaiter2 = default(TaskAwaiter<bool>);
					}
					if (taskAwaiter.GetResult())
					{
						await this.CampaignTask.Start();
					}
				}
				foreach (AttackTask atask in from i in this.AttackTasks
				where i.Enabled
				select i)
				{
					TaskAwaiter<bool> taskAwaiter = atask.Prepare().GetAwaiter();
					if (!taskAwaiter.IsCompleted)
					{
						await taskAwaiter;
						taskAwaiter = taskAwaiter2;
						taskAwaiter2 = default(TaskAwaiter<bool>);
					}
					if (taskAwaiter.GetResult())
					{
						await atask.Start();
						if (this.GlobalConfig.RandomSleep && this.AttackSleepNum > (float)this._ranNum)
						{
							this._ranNum = new Random().Next(30, 60);
							this.AttackSleepNum = 0f;
							int num = new Random().Next(300, 600);
							MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[系统]随机暂停{0}秒", num)), "Log");
							await this.Delay(num * 1000);
							break;
						}
						break;
					}
					else
					{
						atask = null;
					}
				}
				IEnumerator<AttackTask> enumerator3 = null;
				if (this.AwardTask.Enabled)
				{
					await this.AwardTask.Start();
				}
				this.Statistics.CurrentTask = "";
				this.SaveTaskConfig();
			}
			this.Status = Color.Gainsboro;
		}

		// Token: 0x0600066B RID: 1643 RVA: 0x0005A4C8 File Offset: 0x000586C8
		public async Task<List<Zone>> HLLogin(string uid, string channelUid, string accessToken)
		{
			JToken jtoken = await Runtime.Remote.HLLogin(uid, channelUid, accessToken);
			this._userId = jtoken["userId"].ToString();
			return JsonConvert.DeserializeObject<List<Zone>>(jtoken["serverList"].ToString());
		}

		// Token: 0x0600066C RID: 1644 RVA: 0x0005A528 File Offset: 0x00058728
		public async Task<ValueTuple<List<Zone>, string>> HMLogin(string username, string password)
		{
			JToken jtoken = await Runtime.Remote.HMLogin(username, password);
			this._userId = jtoken["userId"].ToString();
			return new ValueTuple<List<Zone>, string>(JsonConvert.DeserializeObject<List<Zone>>(jtoken["serverList"].ToString()), jtoken["defaultServer"].ToString());
		}

		// Token: 0x0600066D RID: 1645 RVA: 0x0005A580 File Offset: 0x00058780
		public async Task<List<Zone>> PassportLogin(string username, string password)
		{
			JToken jtoken = await Runtime.Remote.PassportLogin(username, password);
			this._userId = jtoken["userId"].ToString();
			return JsonConvert.DeserializeObject<List<Zone>>(jtoken["serverList"].ToString());
		}

		// Token: 0x0600066E RID: 1646 RVA: 0x0005A5D8 File Offset: 0x000587D8
		public async Task Login()
		{
			await Runtime.Remote.Login(this._userId);
			InitDataVO initDataVO = await Runtime.Remote.InitGame();
			this.User = initDataVO.userVo;
			this.Secretary = initDataVO.secretary;
			this.UserShip = new ObservableCollection<UserShip>(initDataVO.userShipVO);
			this.Equipments = new ObservableCollection<UserEquipment>(initDataVO.equipmentVo);
			this.PVEExplore = new ObservableCollection<UserExplore>(initDataVO.pveExploreVo.levels);
			this.UnlockShip = new ObservableCollection<int>(initDataVO.unlockShip);
			this.Package = new ObservableCollection<UserItem>(initDataVO.packageVo);
			this.Dock = new ObservableCollection<DockInfo>(from i in initDataVO.dockVo
			where i.locked == 0
			select i);
			this.EquipmentDock = new ObservableCollection<EquipmentDockInfo>(from i in initDataVO.equipmentDockVo
			where i.locked == 0
			select i);
			this.RepairDock = new ObservableCollection<RepairDockInfo>(from i in initDataVO.repairDockVo
			where i.locked == 0
			select i);
			this.UserTask = new ObservableCollection<UserQuest>(initDataVO.taskVo);
			this.Fleet = new ObservableCollection<UserFleet>();
			this.Fleet.UpdateFleet(initDataVO.fleetVo);
			this.Tactics = new ObservableCollection<Tactic>(initDataVO.tactics);
			AllConfigs allConfigs = Runtime.Configs;
			allConfigs.PVEConfig = await Runtime.Remote.GetPVEData();
			allConfigs = null;
			PVEEventConfig pveeventConfig = await Runtime.Remote.GetPeventPVEData();
			Runtime.Configs.PVEConfig.PVELevel.AddRange(pveeventConfig.PVEEventLevel);
			Runtime.Configs.PVEConfig.PVENode.AddRange(pveeventConfig.PVENode);
			Runtime.Configs.PVEConfig.GuardData = pveeventConfig.GuardData;
			Runtime.Configs.PVEConfig.PVELevel.AddRange(Runtime.Configs.OceanData.OceanLevel);
			Runtime.Configs.PVEConfig.PVENode.AddRange(Runtime.Configs.OceanData.OceanNode);
			await this.GoHome();
		}

		// Token: 0x0600066F RID: 1647 RVA: 0x0005A620 File Offset: 0x00058820
		public async Task ReLogin()
		{
			if (this.ServerType == 2)
			{
				await this.HLLogin(this.Username, this.Password.Split(new char[]
				{
					'|'
				})[0], this.Password.Split(new char[]
				{
					'|'
				})[1]);
			}
			else if (this.ServerType == 1)
			{
				await this.PassportLogin(this.Username, this.Password);
			}
			else
			{
				await this.HMLogin(this.Username, this.Password);
			}
			await this.Login();
			UserInfo userInfo = this.User;
			userInfo.DestroyRank = await Runtime.Remote.GetRank();
			userInfo = null;
		}

		// Token: 0x06000670 RID: 1648 RVA: 0x0005A668 File Offset: 0x00058868
		public async void LoadTask()
		{
			LiteCollection<BsonDocument> col = Runtime.ConfigDatabase.GetCollection(this.Username);
			col.EnsureIndex("Type", false);
			if (col.Count() == 0)
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[系统]初始化设置"), "Log");
				this.GlobalConfig.ResetTime = new TimeSpan(3, 10, 0);
				this.DrillTask.FleetID = 0;
				this.DrillTask.Formation = 0;
				this.DrillTask.IsNightWar = true;
				this.CampaignTask.NodeIndex = 5;
				this.CampaignTask.Formation = 4;
				this.CampaignTask.IsNightWar = true;
				this.CampaignTask.RepairStrategy = 0;
				this.RepairTask.MinHours = 4;
				this.RepairTask.MinMinutes = 30;
				col.Insert(BsonMapper.Global.ToDocument<GlobalConfig>(this.GlobalConfig));
				col.Insert(BsonMapper.Global.ToDocument<ExploreTask>(this.ExploreTask));
				col.Insert(BsonMapper.Global.ToDocument<DrillTask>(this.DrillTask));
				col.Insert(BsonMapper.Global.ToDocument<CampaignTask>(this.CampaignTask));
				col.Insert(BsonMapper.Global.ToDocument<RepairTask>(this.RepairTask));
				col.Insert(BsonMapper.Global.ToDocument<StrengthenTask>(this.StrengthenTask));
				col.Insert(BsonMapper.Global.ToDocument<AwardTask>(this.AwardTask));
				col.Insert(BsonMapper.Global.ToDocument<OthersConfig>(this.OthersConfig));
				using (IEnumerator<AttackTask> enumerator = this.AttackTasks.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						AttackTask entity = enumerator.Current;
						col.Insert(BsonMapper.Global.ToDocument<AttackTask>(entity));
					}
					return;
				}
			}
			try
			{
				if (col.Exists(Query.EQ("Type", "GlobalConfig")))
				{
					this.GlobalConfig = BsonMapper.Global.ToObject<GlobalConfig>(col.FindOne(Query.EQ("Type", "GlobalConfig")));
					if (this.GlobalConfig.MusicStart)
					{
						Runtime.AudioManager.BackgroundMusicVolume = 0f;
						await Runtime.AudioManager.PlayBackgroundMusic("port-night.mp3");
						this.Vol = true;
						this.MusicStart = true;
					}
				}
				if (col.Exists(Query.EQ("Type", "ExploreTask")))
				{
					this.ExploreTask = BsonMapper.Global.ToObject<ExploreTask>(col.FindOne(Query.EQ("Type", "ExploreTask")));
				}
				if (col.Exists(Query.EQ("Type", "DrillTask")))
				{
					this.DrillTask = BsonMapper.Global.ToObject<DrillTask>(col.FindOne(Query.EQ("Type", "DrillTask")));
				}
				if (col.Exists(Query.EQ("Type", "CampaignTask")))
				{
					this.CampaignTask = BsonMapper.Global.ToObject<CampaignTask>(col.FindOne(Query.EQ("Type", "CampaignTask")));
				}
				if (col.Exists(Query.EQ("Type", "RepairTask")))
				{
					this.RepairTask = BsonMapper.Global.ToObject<RepairTask>(col.FindOne(Query.EQ("Type", "RepairTask")));
				}
				if (col.Exists(Query.EQ("Type", "StrengthenTask")))
				{
					this.StrengthenTask = BsonMapper.Global.ToObject<StrengthenTask>(col.FindOne(Query.EQ("Type", "StrengthenTask")));
				}
				if (col.Exists(Query.EQ("Type", "AwardTask")))
				{
					this.AwardTask = BsonMapper.Global.ToObject<AwardTask>(col.FindOne(Query.EQ("Type", "AwardTask")));
				}
				if (col.Exists(Query.EQ("Type", "FriendTask")))
				{
					this.FriendTask = BsonMapper.Global.ToObject<FriendTask>(col.FindOne(Query.EQ("Type", "FriendTask")));
				}
				if (col.Exists(Query.EQ("Type", "OthersConfig")))
				{
					this.OthersConfig = BsonMapper.Global.ToObject<OthersConfig>(col.FindOne(Query.EQ("Type", "OthersConfig")));
				}
				List<BsonDocument> list = col.Find(Query.EQ("Type", "AttackTask"), 0, int.MaxValue).ToList<BsonDocument>();
				List<AttackTask> list2 = new List<AttackTask>();
				foreach (BsonDocument doc in list)
				{
					AttackTask attackTask = BsonMapper.Global.ToObject<AttackTask>(doc);
					foreach (RuleFleet ruleFleet in attackTask.RuleFleet)
					{
						using (List<int>.Enumerator enumerator4 = ruleFleet.ShipID.ToList<int>().GetEnumerator())
						{
							while (enumerator4.MoveNext())
							{
								int i = enumerator4.Current;
								if (Runtime.Game.UserShip.All((UserShip s) => s.id != i))
								{
									ruleFleet.ShipID.Remove(i);
								}
							}
						}
					}
					using (List<int>.Enumerator enumerator4 = attackTask.ShipID.ToList<int>().GetEnumerator())
					{
						while (enumerator4.MoveNext())
						{
							int si = enumerator4.Current;
							if (Runtime.Game.UserShip.All((UserShip s) => s.id != si))
							{
								attackTask.ShipID.Remove(si);
							}
						}
					}
					list2.Add(attackTask);
				}
				this.AttackTasks = new ObservableCollection<AttackTask>((from i in list2
				orderby i.Order
				select i).ToList<AttackTask>());
				if (this.GlobalConfig.TaskMaxDelay < this.GlobalConfig.TaskMinDelay)
				{
					this.GlobalConfig.TaskMinDelay = 1;
					this.GlobalConfig.TaskMaxDelay = 10;
				}
				if (this.GlobalConfig.MaxSeconds < this.GlobalConfig.MinSeconds)
				{
					this.GlobalConfig.MinSeconds = 5;
					this.GlobalConfig.MaxSeconds = 30;
				}
			}
			catch (Exception)
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[系统]配置数据库损坏，请清除配置文件后使用"), "Log");
			}
			MessagingCenter.Send<LogMessage>(new LogMessage("[系统]载入任务成功"), "Log");
		}

		// Token: 0x06000671 RID: 1649 RVA: 0x0005A6A4 File Offset: 0x000588A4
		public void SaveTaskConfig()
		{
			LiteCollection<BsonDocument> collection = Runtime.ConfigDatabase.GetCollection(this.Username);
			collection.EnsureIndex("Type", false);
			collection.Upsert(BsonMapper.Global.ToDocument<GlobalConfig>(this.GlobalConfig));
			collection.Upsert(BsonMapper.Global.ToDocument<ExploreTask>(this.ExploreTask));
			collection.Upsert(BsonMapper.Global.ToDocument<DrillTask>(this.DrillTask));
			collection.Upsert(BsonMapper.Global.ToDocument<CampaignTask>(this.CampaignTask));
			collection.Upsert(BsonMapper.Global.ToDocument<RepairTask>(this.RepairTask));
			collection.Upsert(BsonMapper.Global.ToDocument<StrengthenTask>(this.StrengthenTask));
			collection.Upsert(BsonMapper.Global.ToDocument<AwardTask>(this.AwardTask));
			collection.Upsert(BsonMapper.Global.ToDocument<FriendTask>(this.FriendTask));
			collection.Upsert(BsonMapper.Global.ToDocument<OthersConfig>(this.OthersConfig));
			for (int i = 0; i < this.AttackTasks.Count; i++)
			{
				this.AttackTasks[i].Order = i;
				collection.Upsert(BsonMapper.Global.ToDocument<AttackTask>(this.AttackTasks[i]));
			}
		}

		// Token: 0x06000672 RID: 1650 RVA: 0x0005A7E3 File Offset: 0x000589E3
		public void RemoveAttackTaskConfig(AttackTask task)
		{
			Runtime.ConfigDatabase.GetCollection(this.Username).Delete(task.Id);
		}

		// Token: 0x06000673 RID: 1651 RVA: 0x0005A808 File Offset: 0x00058A08
		public async Task Delay(int millisecond)
		{
			int num = new Random().Next(-200, 1000);
			await Task.Delay(millisecond + num);
		}

		// Token: 0x06000674 RID: 1652 RVA: 0x0005A850 File Offset: 0x00058A50
		public async Task GoHome()
		{
			JToken jtoken = await Runtime.Remote.BseaData();
			this.User.todaySpoilsNum = jtoken["bSeaData"].Value<int>("todaySpoilsNum");
			LiveCookInfo liveCookInfo = await Runtime.Remote.GetUserInfo();
			this.User.LiveCookInfo = liveCookInfo;
			TaskAwaiter<JToken> taskAwaiter = Runtime.Remote.GetUserData().GetAwaiter();
			if (!taskAwaiter.IsCompleted)
			{
				await taskAwaiter;
				TaskAwaiter<JToken> taskAwaiter2;
				taskAwaiter = taskAwaiter2;
				taskAwaiter2 = default(TaskAwaiter<JToken>);
			}
			if (taskAwaiter.GetResult()["marketingData"]["continueLoginAward"].Value<int>("canGetDay") > 0)
			{
				this.User.CanLoginAward = true;
			}
			UserInfo userInfo = this.User;
			userInfo.UserPVELevel = await Runtime.Remote.PVEGetUserData();
			userInfo = null;
			JToken jtoken2 = await Runtime.Remote.CampaignUserData();
			this.User.campaignRemainNum = jtoken2["passInfo"].Value<int>("remainNum");
			List<Tactic> source = await Runtime.Remote.GetTactics();
			this.Tactics.UpdateTactic(source.ToList<Tactic>());
		}

		// Token: 0x06000675 RID: 1653 RVA: 0x0005A898 File Offset: 0x00058A98
		public async Task Strengthen(UserShip ship, List<UserShip> relist)
		{
			if (relist.Count > 10)
			{
				await this.Strengthen(ship, relist.Skip(10).ToList<UserShip>());
			}
			StrengthenBoat stre = await Runtime.Remote.Strengthen(ship.id, (from i in relist.Take(10)
			select i.id).ToArray<int>());
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[强化]强化{0}成功,共吞{1}艘狗粮", ship.Name, relist.Count)), "Log");
			MessagingCenter.Send<LogMessage>(new LogMessage("[详细]列表：" + string.Join(", ", from i in relist
			select i.Type.ToName())), "FullLog");
			await this.Delay(1000);
			foreach (UserShip item in relist)
			{
				this.UserShip.Remove(item);
			}
			this.Equipments.UpdateEquipments(stre.equipmentVo);
			this.UserShip.UpdateUserShip(new List<UserShip>
			{
				stre.shipVO
			});
		}

		// Token: 0x06000676 RID: 1654 RVA: 0x0005A8F0 File Offset: 0x00058AF0
		public async Task DismantleBoat(List<int> shipId, int throwEquipment)
		{
			if (shipId.Count > 10)
			{
				await this.DismantleBoat(shipId.Skip(10).ToList<int>(), throwEquipment);
			}
			DismantleBoat re = await Runtime.Remote.DismantleBoat(shipId.Take(10).ToArray<int>(), throwEquipment);
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[分解]分解{0}艘狗粮成功", re.delShips.Count)), "Log");
			await this.Delay(1000);
			using (List<int>.Enumerator enumerator = re.delShips.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					int sid = enumerator.Current;
					this.UserShip.Remove(this.UserShip.Single((UserShip i) => i.id == sid));
				}
			}
			this.Equipments.UpdateEquipments(re.equipmentVo);
			this.User.UpdateUserInfo(re.userVo);
		}

		// Token: 0x06000677 RID: 1655 RVA: 0x0005A948 File Offset: 0x00058B48
		public async Task SupplyFleet(int fleetID, int nodeID = 0)
		{
			await this.SupplyFleet(this.Fleet[fleetID].ships.ToArray(), nodeID);
		}

		// Token: 0x06000678 RID: 1656 RVA: 0x0005A9A0 File Offset: 0x00058BA0
		public async Task SupplyFleet(int[] ship, int nodeID = 0)
		{
			if ((from i in this.UserShip
			where ship.Contains(i.id)
			select i).Any((UserShip i) => i.IsShipNeedSupply))
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[详细]补给：" + string.Join(", ", from i in ship.ToUserShipList()
				select i.Name)), "FullLog");
				SupplyFleet supplyFleet = await Runtime.Remote.SupplyFleet(ship, nodeID);
				SupplyFleet sf = supplyFleet;
				await this.Delay(1000);
				this.UserShip.UpdateUserShip(sf.shipVO);
				this.User.UpdateUserInfo(sf.userVo);
				sf = null;
			}
		}

		// Token: 0x06000679 RID: 1657 RVA: 0x0005A9F8 File Offset: 0x00058BF8
		public async Task Repair(UserShip ship)
		{
			if (!ship.IsInRepair)
			{
				if (this.RepairDock.Any((RepairDockInfo i) => i.IsEmpty))
				{
					MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[修理]修理{0},修理时间{1}秒", ship.Name, ship.RepairTime)), "Log");
					RepairDockInfo repairDockInfo = this.RepairDock.First((RepairDockInfo i) => i.IsEmpty);
					Repair repair = await Runtime.Remote.Repair(ship.id, repairDockInfo.id);
					Repair json = repair;
					await this.Delay(1000);
					this.UserShip.UpdateUserShip(new List<UserShip>
					{
						json.shipVO
					});
					this.RepairDock = new ObservableCollection<RepairDockInfo>(from i in json.repairDockVo
					where i.locked == 0
					select i);
					this.User.UpdateUserInfo(json.userVo);
					json = null;
				}
			}
		}

		// Token: 0x0600067A RID: 1658 RVA: 0x0005AA48 File Offset: 0x00058C48
		public async Task InstantRepair(int dockId)
		{
			if (this.Package.SingleOrDefault((UserItem i) => i.itemCid == 541).num > 0)
			{
				MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[修理]快速修理{0}号船坞", dockId)), "Log");
				InstantRepair instantRepair = await Runtime.Remote.InstantRepair(dockId);
				this.Package.UpdateUserPackage(instantRepair.packageVo);
				this.UserShip.UpdateUserShip(new List<UserShip>
				{
					instantRepair.shipVO
				});
				this.User.UpdateUserInfo(instantRepair.userVo);
				this.RepairDock = new ObservableCollection<RepairDockInfo>(from i in instantRepair.repairDockVo
				where i.locked == 0
				select i);
			}
			else
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[修理]快修不足"), "Log");
			}
		}

		// Token: 0x0600067B RID: 1659 RVA: 0x0005AA98 File Offset: 0x00058C98
		public async Task InstantRepairShip(UserShip ship)
		{
			if (this.Package.SingleOrDefault((UserItem i) => i.itemCid == 541).num > 0)
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[修理]" + ((ship.BrokenType == ShipBrokenType.MiddleBroken) ? "中破" : "大破") + ",快速修理" + ship.Name), "Log");
				InstantRepairShip instantRepairShip = await Runtime.Remote.InstantRepairShip(ship.id);
				InstantRepairShip json = instantRepairShip;
				await this.Delay(1000);
				this.Package.UpdateUserPackage(json.packageVo);
				this.UserShip.UpdateUserShip(json.shipVOs);
				this.User.UpdateUserInfo(json.userVo);
				this.Statistics.QuickRepairNum++;
				json = null;
			}
			else
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[修理]快修不足"), "Log");
			}
		}

		// Token: 0x0600067C RID: 1660 RVA: 0x0005AAE8 File Offset: 0x00058CE8
		public async Task InstantRepairShip(List<int> ships)
		{
			IEnumerable<UserShip> source = from sid in ships
			select this.UserShip.Single((UserShip i) => i.id == sid);
			foreach (UserShip ship in from i in source
			where i.BrokenType == ShipBrokenType.MiddleBroken || i.BrokenType == ShipBrokenType.BigBroken
			select i)
			{
				await this.InstantRepairShip(ship);
			}
			IEnumerator<UserShip> enumerator = null;
		}

		// Token: 0x0600067D RID: 1661 RVA: 0x0005AB38 File Offset: 0x00058D38
		public async Task ChangeBoat(int fleetID, int shipID, int pos)
		{
			UpdateFleet updateFleet = await Runtime.Remote.ChangeBoat(fleetID, shipID, pos);
			UpdateFleet inf = updateFleet;
			await this.Delay(1000);
			this.Fleet.UpdateFleet(inf.fleetVo);
		}

		// Token: 0x0600067E RID: 1662 RVA: 0x0005AB98 File Offset: 0x00058D98
		public async Task InstantFleet(int fleetId, int[] shipId)
		{
			UpdateFleet updateFleet = await Runtime.Remote.InstantFleet(fleetId, shipId);
			UpdateFleet inf = updateFleet;
			await this.Delay(1000);
			this.UserShip.UpdateUserShip(inf.shipVO);
			this.Fleet.UpdateFleet(inf.fleetVo);
		}

		// Token: 0x0600067F RID: 1663 RVA: 0x0005ABF0 File Offset: 0x00058DF0
		public async Task RemoveBoat(List<UserShip> ships)
		{
			var orderedEnumerable = from i in ships
			where i.fleetId > 0
			select new
			{
				Ship = i,
				fleetID = i.fleetId,
				index = this.Fleet[i.fleetId - 1].ships.IndexOf(i.id)
			} into i
			orderby i.fleetID, i.index descending
			select i;
			foreach (var ship in orderedEnumerable)
			{
				JToken jtoken = await Runtime.Remote.RemoveBoat(ship.fleetID, ship.index);
				ship.Ship.fleetId = 0;
				this.Fleet.UpdateFleet(JsonConvert.DeserializeObject<List<UserFleet>>(jtoken["fleetVo"].ToString()));
				await this.Delay(1000);
				ship = null;
			}
			var enumerator = null;
		}

		// Token: 0x06000680 RID: 1664 RVA: 0x0005AC40 File Offset: 0x00058E40
		public async Task BuildBoat(int dockId, int oil, int ammo, int steel, int aluminum)
		{
			List<DockInfo> list = await Runtime.Remote.BuildBoat(dockId, oil, ammo, steel, aluminum);
			this.Dock = new ObservableCollection<DockInfo>(from i in list
			where i.locked == 0
			select i);
			TimeSpan timeSpan = list[dockId - 1].endTime - DateTime.Now;
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[建造]建造舰船，公式：{0} {1} {2} {3}，时间:{4:00}:{5:00}:{6:00}", new object[]
			{
				oil,
				ammo,
				steel,
				aluminum,
				timeSpan.Hours,
				timeSpan.Minutes,
				timeSpan.Seconds
			})), "Log");
			await this.Delay(1000);
		}

		// Token: 0x06000681 RID: 1665 RVA: 0x0005ACB0 File Offset: 0x00058EB0
		public async Task BuildEquipment(int dockId, int oil, int ammo, int steel, int aluminum)
		{
			List<EquipmentDockInfo> list = await Runtime.Remote.BuildEquipment(dockId, oil, ammo, steel, aluminum);
			this.EquipmentDock = new ObservableCollection<EquipmentDockInfo>(from i in list
			where i.locked == 0
			select i);
			TimeSpan timeSpan = list[dockId - 1].endTime - DateTime.Now;
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[建造]建造装备，公式：{0} {1} {2} {3}，时间:{4:00}:{5:00}:{6:00}", new object[]
			{
				oil,
				ammo,
				steel,
				aluminum,
				timeSpan.Hours,
				timeSpan.Minutes,
				timeSpan.Seconds
			})), "Log");
			await this.Delay(1000);
		}

		// Token: 0x06000682 RID: 1666 RVA: 0x0005AD20 File Offset: 0x00058F20
		public async Task InstantBuild(int dockId)
		{
			List<DockInfo> source = await Runtime.Remote.InstantBuild(dockId);
			this.Dock = new ObservableCollection<DockInfo>(from i in source
			where i.locked == 0
			select i);
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[建造]快速完成{0}号船坞", dockId)), "Log");
			await this.Delay(1000);
		}

		// Token: 0x06000683 RID: 1667 RVA: 0x0005AD70 File Offset: 0x00058F70
		public async Task InstantEquipment(int dockId)
		{
			List<EquipmentDockInfo> source = await Runtime.Remote.InstantEquipment(dockId);
			this.EquipmentDock = new ObservableCollection<EquipmentDockInfo>(from i in source
			where i.locked == 0
			select i);
			MessagingCenter.Send<LogMessage>(new LogMessage(string.Format("[建造]快速完成{0}号装备", dockId)), "Log");
			await this.Delay(1000);
		}

		// Token: 0x06000684 RID: 1668 RVA: 0x0005ADC0 File Offset: 0x00058FC0
		public async Task GetBoat(int dockId)
		{
			GetShipData d2 = await Runtime.Remote.GetBoat(dockId);
			GetShipData d = d2;
			this.UserShip.UpdateUserShip(new List<UserShip>
			{
				d.shipVO
			});
			this.Dock = new ObservableCollection<DockInfo>(from i in d.dockVo
			where i.locked == 0
			select i);
			MessagingCenter.Send<LogMessage>(new LogMessage("[建造]船坞建造完成，获得【" + d.shipVO.Name + "】"), "Log");
			MessagingCenter.Send<LogMessage>(new LogMessage("[建造]船坞建造完成，获得【" + d.shipVO.Name + "】"), "PickLog");
			AutoR.Helpers.Extensions.UpdateStatBuild(d.shipVO.shipCid);
			await this.Delay(1000);
			if (!string.IsNullOrEmpty(this.OthersConfig.StopShip) && this.OthersConfig.StopShip.Split(new char[]
			{
				'|'
			}).ToList<string>().Any((string i) => !string.IsNullOrEmpty(i) && d.shipVO.Name.Contains(i)))
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[建造]建造指定船，停止建造"), "Log");
				this.OthersConfig.ShipBuild = false;
			}
		}

		// Token: 0x06000685 RID: 1669 RVA: 0x0005AE10 File Offset: 0x00059010
		public async Task GetEquipment(int dockId)
		{
			GetEquipData d2 = await Runtime.Remote.GetEquipment(dockId);
			GetEquipData d = d2;
			this.Equipments.UpdateEquipments(new List<UserEquipment>
			{
				d.equipmentVo
			});
			this.EquipmentDock = new ObservableCollection<EquipmentDockInfo>(from i in d.equipmentDockVo
			where i.locked == 0
			select i);
			MessagingCenter.Send<LogMessage>(new LogMessage("[建造]装备建造完成，获得【" + d.equipmentVo.Name + "】"), "Log");
			MessagingCenter.Send<LogMessage>(new LogMessage("[建造]装备建造完成，获得【" + d.equipmentVo.Name + "】"), "PickLog");
			AutoR.Helpers.Extensions.UpdateStatEquipment(d.equipmentVo.equipmentCid);
			await this.Delay(1000);
			if (!string.IsNullOrEmpty(this.OthersConfig.StopEquip) && this.OthersConfig.StopEquip.Split(new char[]
			{
				'|'
			}).ToList<string>().Any((string i) => !string.IsNullOrEmpty(i) && d.equipmentVo.Name.Contains(i)))
			{
				MessagingCenter.Send<LogMessage>(new LogMessage("[建造]建造指定装备，停止建造"), "Log");
				this.OthersConfig.EquipmentBuild = false;
			}
		}

		// Token: 0x06000686 RID: 1670 RVA: 0x0005AE60 File Offset: 0x00059060
		public async Task ChangeEquipment(int shipId, int equipId, int equipPos)
		{
			if (this.Equipments.Any((UserEquipment i) => i.equipmentCid == equipId))
			{
				StrengthenBoat strengthenBoat = await Runtime.Remote.ChangeEquipment(shipId, equipId, equipPos);
				this.Equipments.UpdateEquipments(strengthenBoat.equipmentVo);
				this.UserShip.UpdateUserShip(new List<UserShip>
				{
					strengthenBoat.shipVO
				});
				await this.Delay(300);
			}
		}

		// Token: 0x06000687 RID: 1671 RVA: 0x0005AEC0 File Offset: 0x000590C0
		public async Task RemoveEquipment(int shipId, int equipPos)
		{
			StrengthenBoat strengthenBoat = await Runtime.Remote.RemoveEquipment(shipId, equipPos);
			this.Equipments.UpdateEquipments(strengthenBoat.equipmentVo);
			this.UserShip.UpdateUserShip(new List<UserShip>
			{
				strengthenBoat.shipVO
			});
			await this.Delay(300);
		}

		// Token: 0x06000688 RID: 1672 RVA: 0x0005AF18 File Offset: 0x00059118
		public async Task EatCook()
		{
			if (this.GlobalConfig.EatType >= 0 && this.GlobalConfig.EatType < this.User.LiveCookInfo.cookbook.Length)
			{
				await Runtime.Remote.EatCook(this.User.LiveCookInfo.cookbook[this.GlobalConfig.EatType]);
				MessagingCenter.Send<LogMessage>(new LogMessage("[任务]在食堂吃了一份食物"), "Log");
				await this.Delay(1000);
				LiveCookInfo liveCookInfo = await Runtime.Remote.GetUserInfo();
				this.User.LiveCookInfo = liveCookInfo;
			}
		}

		// Token: 0x06000689 RID: 1673 RVA: 0x0005AF60 File Offset: 0x00059160
		public List<UserEquipment> GetEquipmentList()
		{
			List<<>f__AnonymousType2<int, int>> ss = (from i in this.UserShip
			from s in i.Equipment
			select new
			{
				s.cid,
				i.id
			}).ToList();
			List<UserEquipment> list = (from i in (from i in ss
			group i by i.cid).Select(delegate(i)
			{
				UserEquipment userEquipment = new UserEquipment();
				userEquipment.equipmentCid = i.Key;
				userEquipment.num = i.Count();
				userEquipment.ShipEquips = (from s in ss
				where s.cid == i.Key
				select s.cid).ToList<int>();
				return userEquipment;
			})
			where i.equipmentCid != -1
			select i).ToList<UserEquipment>();
			using (List<UserEquipment>.Enumerator enumerator = (from i in this.Equipments
			where i.num > 0
			select i).ToList<UserEquipment>().GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					UserEquipment e = enumerator.Current;
					if (list.Any((UserEquipment i) => i.equipmentCid == e.equipmentCid))
					{
						list.Single((UserEquipment i) => i.equipmentCid == e.equipmentCid).num += e.num;
					}
					else
					{
						list.Add(e);
					}
				}
			}
			return list;
		}

		// Token: 0x040004CC RID: 1228
		private bool _isError;

		// Token: 0x040004CD RID: 1229
		private int _ranNum;

		// Token: 0x040004CE RID: 1230
		private int _sleepmin;

		// Token: 0x040004CF RID: 1231
		private int _sleepmax;
	}
}
